#!/usr/bin/expect

set timeout 20

set password "1111"
set code "https://gitee.com/awoo/adobe-cep.git"
set root "/Library/Application\ Support/Adobe/CEP/extensions"

# spawn sudo rm -rf ${root}/adobe-cep
# expect {
  # "Password:" {send "$password\r"}
# }

# spawn sudo git clone ${code} ${root}/adobe-cep
# expect {
  # "Password:" {send "$password\r"}
# }

spawn sudo git -C ${root}/adobe-cep pull
expect {
  "Password:" {send "$password\r"}
}

interact

